/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.util.Properties;

/** Generated Model for MM_Letter_Of_Attorney_Line
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_MM_Letter_Of_Attorney_Line extends PO implements I_MM_Letter_Of_Attorney_Line, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130821L;

    /** the default Constructor */
    public X_MM_Letter_Of_Attorney_Line(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_MM_Letter_Of_Attorney_Line (Properties ctx, int MM_Letter_Of_Attorney_Line_ID, String trxName)
    {
      super (ctx, MM_Letter_Of_Attorney_Line_ID, trxName);
      /** if (MM_Letter_Of_Attorney_Line_ID == 0)
        {
			setMM_Letter_Of_Attorney_Line_ID (0);
        } */
    }

    /** Load Constructor */
    public X_MM_Letter_Of_Attorney_Line (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_MM_Letter_Of_Attorney_Line[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_Order getC_Order() throws RuntimeException
    {
		return (org.compiere.model.I_C_Order)MTable.get(getCtx(), org.compiere.model.I_C_Order.Table_Name)
			.getPO(getC_Order_ID(), get_TrxName());	}

	/** Set Order.
		@param C_Order_ID 
		Order
	  */
	public void setC_Order_ID (int C_Order_ID)
	{
		if (C_Order_ID < 1) 
			set_Value (COLUMNNAME_C_Order_ID, null);
		else 
			set_Value (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
	}

	/** Get Order.
		@return Order
	  */
	public int getC_Order_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException
    {
		return (org.compiere.model.I_C_UOM)MTable.get(getCtx(), org.compiere.model.I_C_UOM.Table_Name)
			.getPO(getC_UOM_ID(), get_TrxName());	}

	/** Set UOM.
		@param C_UOM_ID 
		Unit of Measure
	  */
	public void setC_UOM_ID (int C_UOM_ID)
	{
		if (C_UOM_ID < 1) 
			set_Value (COLUMNNAME_C_UOM_ID, null);
		else 
			set_Value (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID));
	}

	/** Get UOM.
		@return Unit of Measure
	  */
	public int getC_UOM_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
    {
		return (org.compiere.model.I_M_Product)MTable.get(getCtx(), org.compiere.model.I_M_Product.Table_Name)
			.getPO(getM_Product_ID(), get_TrxName());	}

	/** Set Product.
		@param M_Product_ID 
		Product, Service, Item
	  */
	public void setM_Product_ID (int M_Product_ID)
	{
		if (M_Product_ID < 1) 
			set_Value (COLUMNNAME_M_Product_ID, null);
		else 
			set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
	}

	/** Get Product.
		@return Product, Service, Item
	  */
	public int getM_Product_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_MM_Letter_Of_Attorney getMM_Letter_Of_Attorney() throws RuntimeException
    {
		return (I_MM_Letter_Of_Attorney)MTable.get(getCtx(), I_MM_Letter_Of_Attorney.Table_Name)
			.getPO(getMM_Letter_Of_Attorney_ID(), get_TrxName());	}

	/** Set MM_Letter_Of_Attorney ID.
		@param MM_Letter_Of_Attorney_ID MM_Letter_Of_Attorney ID	  */
	public void setMM_Letter_Of_Attorney_ID (int MM_Letter_Of_Attorney_ID)
	{
		if (MM_Letter_Of_Attorney_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_MM_Letter_Of_Attorney_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_MM_Letter_Of_Attorney_ID, Integer.valueOf(MM_Letter_Of_Attorney_ID));
	}

	/** Get MM_Letter_Of_Attorney ID.
		@return MM_Letter_Of_Attorney ID	  */
	public int getMM_Letter_Of_Attorney_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Letter_Of_Attorney_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set MM_Letter_Of_Attorney_Line ID.
		@param MM_Letter_Of_Attorney_Line_ID MM_Letter_Of_Attorney_Line ID	  */
	public void setMM_Letter_Of_Attorney_Line_ID (int MM_Letter_Of_Attorney_Line_ID)
	{
		if (MM_Letter_Of_Attorney_Line_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_MM_Letter_Of_Attorney_Line_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_MM_Letter_Of_Attorney_Line_ID, Integer.valueOf(MM_Letter_Of_Attorney_Line_ID));
	}

	/** Get MM_Letter_Of_Attorney_Line ID.
		@return MM_Letter_Of_Attorney_Line ID	  */
	public int getMM_Letter_Of_Attorney_Line_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_MM_Letter_Of_Attorney_Line_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Quantity.
		@param Quantity 
		Количество
	  */
	public void setQuantity (int Quantity)
	{
		set_Value (COLUMNNAME_Quantity, Integer.valueOf(Quantity));
	}

	/** Get Quantity.
		@return Количество
	  */
	public int getQuantity () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_Quantity);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Partner Product Key.
		@param VendorProductNo 
		Product Key of the Business Partner
	  */
	public void setVendorProductNo (String VendorProductNo)
	{
		set_Value (COLUMNNAME_VendorProductNo, VendorProductNo);
	}

	/** Get Partner Product Key.
		@return Product Key of the Business Partner
	  */
	public String getVendorProductNo () 
	{
		return (String)get_Value(COLUMNNAME_VendorProductNo);
	}
}